#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int n = 0;
	scanf("%d", &n);
	long int sum = 0;
	int flag = 0;
	for (int i = 2;; i += 3) {
		sum += i;
		flag++;
		if (flag == n) {
			break;
		}
	}
	printf("%d", sum);
	return 0;
}